home *** CD-ROM | disk | FTP | other *** search
/ APDL Other Worlds / APDL Other Worlds Collection.iso / SF3000 / Extras / CBlibrary / h / Pal256 < prev    next >
Encoding:
Text File  |  2003-09-09  |  2.1 KB  |  56 lines

  1. /*
  2.  * CBLibrary - Pal256
  3.  * Copyright (C) 2003  Chris Bazley
  4.  *
  5.  * This library is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU Lesser General Public
  7.  * License as published by the Free Software Foundation; either
  8.  * version 2.1 of the License, or (at your option) any later version.
  9.  *
  10.  * This library is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  * Lesser General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU Lesser General Public
  16.  * License along with this library; if not, write to the Free Software
  17.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18.  */
  19.  
  20. /*
  21.   256 colour selection dialogue
  22.  
  23.   Usage:
  24.   - Create a Pal256 object and call Pal256_initialise to register handers etc.
  25.   - Register a toolbox event handler for event Pal256_ColourSelected.
  26.   - Client must call Pal256_set_colour before dialogue is displayed (trap Window_AboutToBeShown event or similar if necessary).
  27.   - Upon receiving a Pal256_ColourSelected event, check that parent object/component match yours before using the returned colour number.
  28. */
  29.  
  30. #ifndef Pal256_h
  31. #define Pal256_h
  32.  
  33. #include "kernel.h"
  34. #include "toolbox.h"
  35.  
  36. /****************************************************************************
  37.  * Pal256 Toolbox Events                                                    *
  38.  ****************************************************************************/
  39.  
  40. #define Pal256_ColourSelected     0x100
  41.  
  42. typedef struct
  43. {
  44.   ToolboxEventHeader hdr;
  45.   int                colour_number;
  46. } Pal256ColourSelectedEvent;
  47.  
  48. /****************************************************************************
  49.  * Pal256 Functional Interface                                              *
  50.  ****************************************************************************/
  51.  
  52. extern _kernel_oserror *Pal256_initialise(ObjectId object);
  53. extern _kernel_oserror *Pal256_set_colour(ObjectId object, char colour_number);
  54.  
  55. #endif
  56.